﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Benefit.Models.Day
{
    /// <summary>
    /// 操作员罚款
    /// </summary>
    public class OperatorPublish
    {
        public int Id { get; set; }

        public int TradeHistoryId { get; set; }

        public virtual Sys.TradeHistory TradeHistory { get; set; }

        public int OperatorId { get; set; }

        public virtual Sys.Operator Operator { get; set; }

        public double Publish { get; set; }

        public int ProductId { get; set; }

        public virtual Sys.Product Product { get; set; }

        public string SomethingToSay { get; set; }
        /// <summary>
        /// 亏损额
        /// </summary>
        public double LossCount { get; set; }
        /// <summary>
        /// 止损额
        /// </summary>
        public double StopLoseCount { get; set; }


        //public OperatorPublish GetOperatorPublish(int tradeHistoryId, int operatorid, DB.DBManager db)
        //{
        //    OperatorPublish publish = new OperatorPublish();
        //    var query = db.OperatorPublish.Where(a => a.OperatorId == operatorid).Where(a => a.TradeHistoryId == tradeHistoryId);
        //    if (query.Count() > 0)
        //    {
        //        publish = query.First();
        //    }
        //    return publish;
        //}



        //public void InitPublish()
        //{

        //}
    }
}